import {Component, Input, OnInit} from '@angular/core';
import {EntityRef} from '../../entity/entity-ref';
import {Entity} from '../../entity/entity';
import {DocApi} from '../../entity/doc-api';
import {ParamEntity} from '../../entity/param-entity';

@Component({
    selector: 'app-page-api-rest-demo',
    templateUrl: './page-api-rest-demo.component.html',
    styleUrls: ['./page-api-rest-demo.component.css']
})
export class PageApiRestDemoComponent implements OnInit {

    @Input()
    api: DocApi;

    /**
     * 实体类参数，需要展示内部结构
     */
    @Input()
    paramEntities: ParamEntity[];

    @Input()
    requestBodys: EntityRef[];

    @Input()
    entryRefMap: Map<EntityRef, Entity>;

    @Input()
    response: EntityRef;

    constructor() {
    }

    ngOnInit() {
    }

}
